package com.szmd.gradle;

import org.gradle.api.Project;

/**
 * created by : chentl
 * Date: 2021/01/07
 */
public class Extension {

    //pgyer
    public String pgyApiKey;
    public String appName;
    public String changeLog;


    //dingtalk
    public String apiToken;
    public String msgTitle;
    public String msgContent;
    public String singleButtonTitle;
    public String singleButtonUrl;

    public Extension(Project project) {
    }

    public static Extension getConfig(Project project){
        Extension config = project.getExtensions().findByType(Extension.class);
        if (config == null) {
            config = new Extension(project);
        }
        return config;
    }
}
